Embed Snippets

Pyramid makes it easy for developers to grab code snippets needed to embed a specific content item. Although more advanced application developers will use the full embed API framework (and possibly the REST API framework as well), the embed snippet gives a quick example of how to embed the selected item into a host web page as part of a broader app using pure JavaScript.

Embed snippets, by definition, are only available for Discover reports and Present dashboards.

Embedding is only available to customers who have purchased the separate 'Embed' license option.

Accessing Embed Snippets

Embed snippets are available using the quick action buttons on the Action Panel for a given Discover or Present content item (green circle below). It can also be accessed from the item's tab menu in the App Tab Interface.

Once clicked, the developer will be presented with the following dialog.

First, the user should set the width and height of the widget when launched in its host page (red box above). Next, the user can elect to copy the entire snippet to the clipboard (green arrow), which will take the script for both the green and red highlighted items in the text box. Or they can elect to copy just the component container (red highlighted item only) without the script (red arrow).

If embedding on the same page, the embed script (green highlighted text) is only required ONCE on the hosting page itself.

Embed Authentication

Embedded content, like all content in Pyramid, requires user authentication. Before the snippets can be operational, the developer needs to ensure that an embed security token is correctly stored the host page.